package cn.bocweb.spinning.view.activity;

import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.widget.ListView;

import java.util.ArrayList;
import java.util.List;

import butterknife.Bind;
import butterknife.ButterKnife;
import cn.bocweb.spinning.R;
import cn.bocweb.spinning.view.adapter.LibraryAdapter;
import cn.bocweb.spinning.view.common.BaseActivity;

public class LibraryActivity extends BaseActivity {

    @Bind(R.id.toolbar)
    Toolbar toolbar;
    @Bind(R.id.listView)
    ListView listView;

    LibraryAdapter adapter;
    List<String> list;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_library);
        ButterKnife.bind(this);
        loadData();
    }

    private void loadData() {
        list = new ArrayList<>();
        adapter = new LibraryAdapter(this, list);

        toolbar.setNavigationIcon(R.mipmap.ic_launcher);
        listView.setAdapter(adapter);

    }
}
